// 如果没有通过拦截器配置域名的话，可以在这里写上完整的URL(加上域名部分)
let openid = '/api/get_openid'; //获取openid
let loginurl = '/api/login'; //登录
let phoneurl = '/api/send_phone'; //获取手机验证码
let register = '/api/register'; //注册
let userinfo = '/admin/get_user_info'; //获取用户信息
let bannerList = '/api/get_banner_list'; //获取banner
let categoryurl = '/api/get_category_list'; //商品主题栏接口
let tabclass = '/api/get_tab_class_data'; //9.9包邮 tabs
let classurl = '/api/get_category_goods'; //分类
let searchgoods = '/api/jd_search_goods'; //关键词搜索
let jdgoods = '/api/get_Jd_goods'; //京粉精选商品查询接口
let changelink = '/admin/get_extension_link'; //转链
let goodsinfo = '/api/get_sku_by_goods_info'; //获取商品信息
let goodsdetail = '/api/get_goods_detail'; //获取商品詳情
let goodscollection = '/admin/get_find_is_collection'; //查询商品是否被收藏
let delcollection = '/admin/del_collection_info'; //取消收藏
let getcollection = '/admin/add_collection_goods'; //加入收藏
let configinfo = '/api/get_config_info'; //首頁頂部样式
let agreementinfo = '/api/get_agreement_info'; //用户获取使用协议接口
let fansdetail = '/admin/get_fans_detail'; //粉丝详情
let fansinfo = '/admin/get_fans_info'; //粉丝概览
let updatephone = '/admin/update_user_phone'; //换绑手机号
let tixian = '/admin/add_user_withdrawal'; //提现
let userassets = '/admin/user_assets_list'; //获取个人资产
let commissonwithdrawal = '/admin/user_commission_withdrawal'; //获取实时佣金提现
let bangaliPay = '/admin/bing_alipay_info'; //绑定支付宝
let collectionlist = '/admin/get_collection_list'; //获取收藏列表
let userprice = '/admin/user_price_list'; //用户余额记录
let estimatecomm = '/admin/user_estimate_commission'; //用户预估佣金
let settlement = '/admin/user_settlement_list'; //用户结算记录
let userorderdetail = '/admin/user_order_detail'; //用户订单详情
let withdrawaldetail = '/admin/user_withdrawal_detail'; //用户提现记录
let createqrcode = '/api/create_qr_code'; //获取小程序码
let msglist = '/api/get_msg_list'; //获取消息通知
let problemlist = '/api/get_problem_list'; //获取常见问题
let problemdetail = '/api/get_problem_detail'; //获取问题答案
let tenproblem = '/api/get_people_problem'; //获取新人十问
let recommendgoods = '/api/get_recommend_goods_list'; //获取商品推荐列表
let sourcelist = '/api/get_source_list'; //获取素材
let releaselist = '/admin/get_release_list'; //获取交流列表
let comcontent = '/api/get_comment_content'; //获取评论列表
let commentinfo = '/admin/add_comment_info'; //发布评论
let fabulous = '/admin/click_fabulous_content'; //点赞评论
let releasecontent = '/admin/add_release_content'; //用户发布内容
let classList = '/api/get_class_list'; //分类一级导航
let classDetail = '/api/get_class_detail'; //分类一级导航
let shareposter = '/admin/get_share_poster_data'; //获取海报
let upload = '/api/upload_base'; //base64 上传
let invitationcode = '/api/get_invitation_code'; //根据邀请码 获取用户信息


const install = (Vue, vm) => {
	// 获取openid
	let getOpenId = (params = {}) => vm.$u.get(openid, params);
	let doLogin = (params = {}) => vm.$u.post(loginurl, params);
	let getPhoneCode = (params = {}) => vm.$u.post(phoneurl, params);
	let doRegister = (params = {}) => vm.$u.post(register, params);
	let getUserInfo = (params = {}) => vm.$u.get(userinfo, params);
	let getBannerList = (params = {}) => vm.$u.get(bannerList, params);
	let getCategoryList = (params = {}) => vm.$u.get(categoryurl, params);
	let getTabClass = (params = {}) => vm.$u.get(tabclass, params);
	let getClassList = (params = {}) => vm.$u.get(classurl, params);
	let doSearchGoods = (params = {}) => vm.$u.get(searchgoods, params);
	let getJdGoods = (params = {}) => vm.$u.get(jdgoods, params);
	let doChangeLink = (params = {}) => vm.$u.get(changelink, params);
	let getGoodsInfo = (params = {}) => vm.$u.get(goodsinfo, params);
	let getGoodsDetail = (params = {}) => vm.$u.get(goodsdetail, params);
	let doQueryCollection = (params = {}) => vm.$u.get(goodscollection, params);
	let doDelCollection = (params = {}) => vm.$u.get(delcollection, params);
	let doCollection = (params = {}) => vm.$u.post(getcollection, params);
	let getConfigInfo = (params = {}) => vm.$u.get(configinfo, params);
	let getAgreementInfo = (params = {}) => vm.$u.get(agreementinfo, params);
	let getFansDetail = (params = {}) => vm.$u.get(fansdetail, params);
	let getFansInfo = (params = {}) => vm.$u.get(fansinfo, params);
	let doUpdatePhone = (params = {}) => vm.$u.post(updatephone, params);
	let doWithdraw = (params = {}) => vm.$u.post(tixian, params);
	let getUserAssets = (params = {}) => vm.$u.get(userassets, params);
	let getCommissonWithdrawal = (params = {}) => vm.$u.get(commissonwithdrawal, params);
	let doBangAlipay = (params = {}) => vm.$u.post(bangaliPay, params);
	let getCollectionList = (params = {}) => vm.$u.get(collectionlist, params);
	let getUserPrice = (params = {}) => vm.$u.get(userprice, params);
	let getEstimateComm = (params = {}) => vm.$u.get(estimatecomm, params);
	let getSettlement = (params = {}) => vm.$u.get(settlement, params);
	let getOrderDetail = (params = {}) => vm.$u.get(userorderdetail, params);
	let getWithdrawalDetail = (params = {}) => vm.$u.get(withdrawaldetail, params);
	let getCreateQrCode = (params = {}) => vm.$u.get(createqrcode, params);
	let getMsgList = (params = {}) => vm.$u.get(msglist, params);
	let getProblemList = (params = {}) => vm.$u.get(problemlist, params);
	let getProblemDetail = (params = {}) => vm.$u.get(problemdetail, params);
	let getTenProblem = (params = {}) => vm.$u.get(tenproblem, params);
	let getRecommendGoods = (params = {}) => vm.$u.get(recommendgoods, params);
	let getSourceList = (params = {}) => vm.$u.get(sourcelist, params);
	let getReleaseList = (params = {}) => vm.$u.get(releaselist, params);
	let getComContent = (params = {}) => vm.$u.get(comcontent, params);
	let doCommentInfo = (params = {}) => vm.$u.post(commentinfo, params);
	let doFabulous = (params = {}) => vm.$u.get(fabulous, params);
	let doreleasecontent = (params = {}) => vm.$u.post(releasecontent, params);
	let getCateClassList = (params = {}) => vm.$u.get(classList, params);
	let getCateClassDetail = (params = {}) => vm.$u.get(classDetail, params);
	let getSharePoster = (params = {}) => vm.$u.get(shareposter, params);
	let doUpload = (params = {}) => vm.$u.post(upload, params);
	let getInvitationCode = (params = {}) => vm.$u.get(invitationcode, params);



	vm.$u.api = {
		getOpenId,
		doLogin,
		getPhoneCode,
		doRegister,
		getUserInfo,
		getBannerList,
		getCategoryList,
		getTabClass,
		getClassList,
		doSearchGoods,
		getJdGoods,
		doChangeLink,
		getGoodsInfo,
		getGoodsDetail,
		doQueryCollection,
		doDelCollection,
		doCollection,
		getConfigInfo,
		getAgreementInfo,
		getFansDetail,
		getFansInfo,
		doUpdatePhone,
		doWithdraw,
		getUserAssets,
		getCommissonWithdrawal,
		doBangAlipay,
		getCollectionList,
		getUserPrice,
		getEstimateComm,
		getSettlement,
		getOrderDetail,
		getWithdrawalDetail,
		getCreateQrCode,
		getMsgList,
		getProblemList,
		getProblemDetail,
		getTenProblem,
		getRecommendGoods,
		getSourceList,
		getReleaseList,
		getComContent,
		doCommentInfo,
		doFabulous,
		doreleasecontent,
		getCateClassList,
		getCateClassDetail,
		getSharePoster,
		doUpload,
		getInvitationCode,
	};
}

export default {
	install
}
